package c.i.b.b.a;

import java.io.File;
import java.io.FileFilter;
import java.util.HashMap;
import java.util.regex.Pattern;

public class a {
    public static final FileFilter a = new a();

    public static class a implements FileFilter {
        public boolean accept(File file) {
            return Pattern.matches("cpu[0-9]", file.getName());
        }
    }

    /* JADX WARNING: Missing exception handler attribute for start block: B:19:0x0022 */
    /* JADX WARNING: Removed duplicated region for block: B:15:0x001b A:{SYNTHETIC, Splitter:B:15:0x001b} */
    /* JADX WARNING: Removed duplicated region for block: B:15:0x001b A:{SYNTHETIC, Splitter:B:15:0x001b} */
    /* JADX WARNING: Failed to process nested try/catch */
    /* JADX WARNING: Missing block: B:18:0x0020, code skipped:
            if (r1 == null) goto L_0x0027;
     */
    public static java.lang.String a(java.lang.String r2) {
        /*
        r0 = 0;
        r1 = new java.io.FileReader;	 Catch:{ all -> 0x0017 }
        r1.<init>(r2);	 Catch:{ all -> 0x0017 }
        r2 = new java.io.BufferedReader;	 Catch:{ all -> 0x0015 }
        r2.<init>(r1);	 Catch:{ all -> 0x0015 }
        r0 = r2.readLine();	 Catch:{ all -> 0x0013 }
        r2.close();	 Catch:{ all -> 0x0022 }
        goto L_0x0022;
        goto L_0x0019;
    L_0x0015:
        r2 = r0;
        goto L_0x0019;
    L_0x0017:
        r2 = r0;
        r1 = r2;
    L_0x0019:
        if (r2 == 0) goto L_0x0020;
    L_0x001b:
        r2.close();	 Catch:{ all -> 0x001f }
        goto L_0x0020;
    L_0x0020:
        if (r1 == 0) goto L_0x0027;
    L_0x0022:
        r1.close();	 Catch:{ all -> 0x0026 }
        goto L_0x0027;
    L_0x0027:
        if (r0 != 0) goto L_0x002c;
    L_0x0029:
        r2 = "0";
        goto L_0x0030;
    L_0x002c:
        r2 = r0.trim();
    L_0x0030:
        return r2;
        */
        throw new UnsupportedOperationException("Method not decompiled: c.i.b.b.a.a.a(java.lang.String):java.lang.String");
    }

    public static String b(HashMap<String, String> hashMap, String str) {
        String str2;
        try {
            str2 = (String) hashMap.get(str);
        } catch (Throwable unused) {
            str2 = null;
        }
        return str2 == null ? "" : str2.trim();
    }

    /* JADX WARNING: Removed duplicated region for block: B:27:0x004a A:{SYNTHETIC, Splitter:B:27:0x004a} */
    /* JADX WARNING: Removed duplicated region for block: B:27:0x004a A:{SYNTHETIC, Splitter:B:27:0x004a} */
    /* JADX WARNING: Missing exception handler attribute for start block: B:10:0x001b */
    /* JADX WARNING: Failed to process nested try/catch */
    /* JADX WARNING: Can't wrap try/catch for region: R(5:8|9|10|11|31) */
    /* JADX WARNING: Missing block: B:30:0x004f, code skipped:
            if (r2 == null) goto L_0x0052;
     */
    public static java.util.HashMap<java.lang.String, java.lang.String> c() {
        /*
        r0 = new java.util.HashMap;
        r0.<init>();
        r1 = 0;
        r2 = new java.io.FileReader;	 Catch:{ all -> 0x0047 }
        r3 = "/proc/cpuinfo";
        r2.<init>(r3);	 Catch:{ all -> 0x0047 }
        r3 = new java.io.BufferedReader;	 Catch:{ all -> 0x0045 }
        r3.<init>(r2);	 Catch:{ all -> 0x0045 }
    L_0x0012:
        r1 = r3.readLine();	 Catch:{ all -> 0x0043 }
        if (r1 != 0) goto L_0x001f;
    L_0x0018:
        r3.close();	 Catch:{ all -> 0x001b }
    L_0x001b:
        r2.close();	 Catch:{ all -> 0x0052 }
        goto L_0x0052;
    L_0x001f:
        r4 = ":";
        r5 = 2;
        r1 = r1.split(r4, r5);	 Catch:{ all -> 0x0043 }
        r4 = r1.length;	 Catch:{ all -> 0x0043 }
        if (r4 >= r5) goto L_0x002a;
    L_0x0029:
        goto L_0x0012;
    L_0x002a:
        r4 = 0;
        r4 = r1[r4];	 Catch:{ all -> 0x0043 }
        r4 = r4.trim();	 Catch:{ all -> 0x0043 }
        r5 = 1;
        r1 = r1[r5];	 Catch:{ all -> 0x0043 }
        r1 = r1.trim();	 Catch:{ all -> 0x0043 }
        r5 = r0.get(r4);	 Catch:{ all -> 0x0043 }
        if (r5 == 0) goto L_0x003f;
    L_0x003e:
        goto L_0x0012;
    L_0x003f:
        r0.put(r4, r1);	 Catch:{ all -> 0x0043 }
        goto L_0x0012;
    L_0x0043:
        r1 = r3;
        goto L_0x0048;
        goto L_0x0048;
    L_0x0047:
        r2 = r1;
    L_0x0048:
        if (r1 == 0) goto L_0x004f;
    L_0x004a:
        r1.close();	 Catch:{ all -> 0x004e }
        goto L_0x004f;
    L_0x004f:
        if (r2 == 0) goto L_0x0052;
    L_0x0051:
        goto L_0x001b;
    L_0x0052:
        return r0;
        */
        throw new UnsupportedOperationException("Method not decompiled: c.i.b.b.a.a.c():java.util.HashMap");
    }
}
